<div class="panel panel-default" ng-controller="DriverListCtrl">
	<div class="panel-heading">
		司机管理
	</div>
	<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
	<div class="row wrapper m-n">
		<form class="bs-example form-horizontal ng-pristine ng-valid">
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.name" class="form-control" placeholder="姓名">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.idCard" class="form-control" placeholder="身份证">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<div class="input-group">
						<ui-select ng-model="orglist.selected" theme="bootstrap">
							<ui-select-match placeholder="所属单位">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="org in orglist | propsFilter: {name: $select.search}">
								<span ng-bind-html=" org.name| highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
						<span class="input-group-btn">
							<button ng-click="orglist.selected = undefined"
								class="btn btn-default">
								<span class="glyphicon glyphicon-trash"></span>
						</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<button type="button" class="btn btn-info" ng-click="query()">查询</button>
				</div>
			</div>
		</form>
	</div>
	<div class="table-responsive">
		<table class="table table-striped b-t b-light">
			<thead>
				<tr>
					<th style="width:10px;"></th>
					<th style="width:70px;">编号</th>
					<th style="width:70px;">姓名</th>
					<th style="width:70px;">手机</th>
					<th style="width:70px;">驾照</th>
					<th style="width:100px;">所属单位</th>
					<th style="width:120px;">状态</th>
					<th style="width:90px;">最后登录时间</th>
					<th style="width:100px;">
						<div class="list-icon">
							<a href tooltip="添加司机" has-authority="SYSTEM_DRIVER_ADD">
								<i class="fa fa-plus fa-fw" ng-click="write('lg',null,'insert')"></i>
							</a>
						</div>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="driver in dataList">
					<td></td>
					<td>{{driver.code}}</td>
					<td>{{driver.name}}</td>
					<td>{{driver.phone}}</td>
					<td>{{driver.license}}</td>
					<td>{{driver.org.name}}</td>
					<td>{{driver.status | driverFilter }}</td>
					<td>{{driver.lastLoginTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
					<td>
						<div class="list-icon">
							<a href tooltip="附件上传" has-authority="SYSTEM_DRIVER_UPLOAD"><i class="fa fa-folder-open" ng-click="upload('lg',driver)" ></i></a>
							<a href tooltip="修改" has-authority="SYSTEM_DRIVER_UPDATE"><i class="fa fa-pencil fa-fw m-r-xs" ng-click="write('lg',driver,'update')" ></i></a>
							<a href tooltip="删除" has-authority="SYSTEM_DRIVER_DEL"><i class="fa fa-times fa-fw" ng-click="del('sm',driver ,'delete')" ></i></a>
							<a href tooltip="取消黑名单" has-authority="SYSTEM_DRIVER_BLACK" ng-if="driver.status==3"><i class="fa fa-check" ng-click="offblack(driver)" ></i></a>
							<a href tooltip="设为黑名单" has-authority="SYSTEM_DRIVER_BLACK" ng-if="driver.status!=3&&driver.status!=0"><i class="fa fa-pencil fa-ban" ng-click="setblack(driver)" ></i></a>
						</div>
					</td>
				</tr>
				<tr ng-show="dataList==''">
					<td colspan="10" style="text-align: center;">暂无司机信息</td>
				</tr>
			</tbody>
		</table>
	</div>
	<page-footer/>
</div>